﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ComponentModel;

namespace BusinessPlatform.Core.BusinessObject.Binding
{
    public class BindableBase:IBindableBase
    {
        public event PropertyChangedEventHandler PropertyChanged;
        public event PropertyChangingEventHandler PropertyChanging;
        /// <summary>
        /// 属性变化后
        /// </summary>
        /// <param name="PropertyName"></param>
        protected void OnPropertyChanged(string PropertyName)
        {
            if (PropertyChanged != null)
            {
                PropertyChanged(this, new PropertyChangedEventArgs(PropertyName));
            }
        }
        /// <summary>
        /// 属性变化前
        /// </summary>
        /// <param name="PropertyName"></param>
        protected void OnPropertyChanging(string PropertyName)
        {
            if (PropertyChanging != null)
            {
                PropertyChanging(this, new PropertyChangingEventArgs(PropertyName));
            }
        }
    }
}
